package com.ssm.hj.controller;

import com.github.pagehelper.PageInfo;
import com.ssm.hj.page.Page;
import com.ssm.hj.search.Search;
import com.ssm.hj.service.TInterposeFollowupVisitService;
import com.ssm.hj.view.MemberView;
import com.ssm.hj.view.TInterposeFollowupVisitView;
import com.ssm.pojo.TInterposeFollowupVisit;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class TInterposeFollowupVisitController {
    @Resource
    private TInterposeFollowupVisitService tInterposeFollowupVisitService;

    @RequestMapping("/hj/queryTInterposeFollowupVisitAll")
    PageInfo<TInterposeFollowupVisitView> queryTInterposeFollowupVisitAll(@RequestBody Page<Search> page) throws Exception{
        return this.tInterposeFollowupVisitService.queryTInterposeFollowupVisitAllService(page);
    }
    @RequestMapping("/hj/queryTInterposeSchemeAll")
    public List<MemberView> queryTInterposeSchemeAll() throws Exception {
        return this.tInterposeFollowupVisitService.queryTInterposeSchemeAllService();
    }
    @RequestMapping("/hj/addTInterposeSchemeAll")
    public int addTInterposeSchemeAll(@RequestBody TInterposeFollowupVisit tInterposeFollowupVisit) throws Exception {
        return this.tInterposeFollowupVisitService.addTInterposeSchemeAllService(tInterposeFollowupVisit);
    }
}
